package com.iule.common.playboy.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import com.fasterxml.jackson.annotation.*;
/**
 * <p>
 *  item对象
 * </p>
 *
 * @author 柚子
 * @since 2020-03-16
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="Item对象", description="主要配置项目")
public class Item extends Model<Item> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "配置的key")
    private String configKey;

    @ApiModelProperty(value = "控制项id 为空则为默认项")
    private Integer controlId;

    @ApiModelProperty(value = "appId 为空则为全局配置")
    private Integer appId;

    @ApiModelProperty(value = "配置值")
    private String configValue;

    @ApiModelProperty(value = "创建时间")
    @JsonFormat(pattern ="yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    @ApiModelProperty(value = "更新时间")
    @JsonFormat(pattern ="yyyy-MM-dd HH:mm:ss")
    private Date modifyTime;

    @ApiModelProperty(value = "作者")
    private String author;

    @ApiModelProperty(value = "状态 0 待生效 1 已生效")
    private Boolean status;

    @ApiModelProperty(value = "版本号 从1开始")
    private Integer versionId;

    @ApiModelProperty(value = "字段说明备注")
    private String comment;


    public static final String ID = "id";

    public static final String CONFIG_KEY = "config_key";

    public static final String CONTROL_ID = "control_id";

    public static final String APP_ID = "app_id";

    public static final String CONFIG_VALUE = "config_value";

    public static final String CREATE_TIME = "create_time";

    public static final String MODIFY_TIME = "modify_time";

    public static final String AUTHOR = "author";

    public static final String STATUS = "status";

    public static final String VERSION_ID = "version_id";

    public static final String COMMENT = "comment";

    @Override
    protected Serializable pkVal() {
        return this.id;
    }


}
